<template>
  <div class="layout">
    <menu1 :nums="nums" title="我是父组件传参给子组件str"></menu1>
    <div class="layout-right">
      <header1></header1>
      <span>子组件单独传参defineExpose</span>
      {{ list }}
      <content ref="contentList" @on-click="getVal"></content>
    </div>
  </div>
</template>

<script lang="ts" setup>
import {computed, ref, reactive} from 'vue'
import menu1 from "./menu/Menu.vue";
import header1 from "./header/Header.vue";
import Content from "./content/Content.vue";

let contentList = ref(null)
let nums = reactive<number[]>([6, 6, 6])
let getVal = (val: string) => {
  console.log("子组件传值给父组件" + val)
  console.log(contentList.value)
}

</script>

<style lang="less" scoped>
.layout {
  display: flex;
  height: 100%;
  overflow: hidden; //滑动隐藏
  &-right {
    flex: 1px;
    display: flex;
    flex-direction: column;
  }
}

</style>

